perm filename MICRO[PUR,LCS] blob
sn#433785 filedate 1979-07-23 generic text, type C, neo UTF8
COMMENT ā VALID 00004 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 A COMPARISON OF MICROPROCESSORS FOR SERVO CONTROL.
C00005 00003 HARDWARE COMPARISONS.
C00009 00004 SOFTWARE COMPARISONS.
C00014 ENDMK
Cā;
A COMPARISON OF MICROPROCESSORS FOR SERVO CONTROL.
As requested, this note mainly deals with the 6502 and Z80A.
Many other microprocessors should also be considered (8088,8086,Z8,
Z8000, 68B01,2,3,5,9,68C02,68000,SY65?,99E40,8741,8748, etc.), but
availability, price, and ease of prototyping (rom program memory),
make most impractical at the present time.
FUNCTIONS OF THE JOINT PROCESSOR.
As many functions as posible should be performed by the joint
processor. Any analog functions in present designs should be replaced
by software. The optimal joint servo would be only a motor or valve,
an amplifier, a dual port ram, and a processor with a DAC, program
memory, and position feedback inputs.
The main features wanted in a microprocessor for joint control
are:
Parts count. The most functions in the least number of parts.
Price. The most functions per dollar.
Speed. Not in fastest signal but in highest throughput.
Ease of use. The simplest to use is the simplest to change.
Good arithmetic capability. The more functions done by the
joint, the more functions the host processor is capable of doing.
Fast interrupt response. Since most joint motion is
synchronized, faster interrupt response means less overhead and
greater timing resolution.
Good instruction set and processor architecture. Higher speed
is useless with a bad instruction set while ease of use can suffer
from both.
Fast and simple joint host communcation. Good resolution
requires fast parameter passing between the host and each joint.
For speed and simple software, a dual port memory system is the best
solution for joint - host communication.
HARDWARE COMPARISONS.
The main differences between the processors as far as hardware,
is in the way they are implemented. The 6502, like the 6800, is a
random logic machine with multiple sequencers, while the Z80 like the
8080 uses an internal state machine. Some of the benifits of random
logic include less states for many instructions and simpler bus timing
allowing easier interfacing and lower parts count.
Although the 4MHz clock of the Z80A is twice the 6502A's
2MHz, bus bandwidth is better utilized with the 6502 so that most
operations are performed faster with less critical timing. 6502 based
systems can use slower (less expensive) memory while functioning as
fast as Z80 systems.
Generally it is simpler to interface an 8080/Z80 bus compatible
part to a 6502 based system than interfacing a 6502/6800 part to an
8080/Z80 bus system.
The dual port ram becomes much easier to implement with the
6502's simple bus timing. Since the data bus on the 6502 is only
used during the second half of the processor cycle, by doubleing
the bus speed the other half of the cycle is avilible for the host
interface.
The Z80's automatic dynamic ram refreshing is not usefull in
a joint servo because only a small amount of static ram is needed,
it adds problems to the dual port ram design, and wastes bus time.
Both the 6502 and the Z80 require the same parts count for
a minimum system without the dual port ram, but if more than a few
blocks of memory are decoded the Z80 system may need more addressing
logic. The dual port ram adds many parts to the Z80 design becuase
of the need to garantee free data bus cycles, while the 6502 system
is simplified by it's split cycle bus timing.
Other methods of host - joint communication include interrupt
driven I/O port communication (which is used on the Puma system), and
direct memory access using an LSI DMA controler. The first method was
found to be a speed bottleneck in the Puma system and the DMA approach
suffers from speed, software complexity, and cost.
The S.O. pin on the 6502 may be used for direct processor flag
setting or as a serial input with speeds up to 200k bits per second.
This comparison is based on the folowing minimum system.
Each function is in one package except the ram and I/O which are
functional blocks. Buffers are not included and are assumed to be the
same for both systems.
clock gen. 1 0 with synchronized clock.
addr decode 1 Simpler on 6502.
microprocessor 1
rom 1
dac 1
ram 1
I/O 1
SOFTWARE COMPARISONS.
Although much more software has been writen for the Z80,
almost all software from other systems is useless for joint servo
applications. By having an architecture similar to a mini computer,
the 6502 is easier to program than the Z80's register structure.
There are many differences between the 6502 and the Z80 in
their instruction sets and processor architecture. The Z80 is a
register machine while the 6502 is more arithmetic and memory
oriented.
Features of the Z80 instruction set include block transfer
search, bit manipulation, 16 bit index registers, and conditional
call, jump, and return instructions. Block transfer and search
instructions are mainly useful for performing simple functions on
blocks of data, which make them very useful in word processing, etc.,
but are of limited use in a servo application.
The Z80's bit manipulation instructions are slightly faster
than the 6502's bit test and programed set/reset, but in a joint
servo application most data consists of 8, 16, and 24 bit values.
Although the 6502 has only 8 bit index registers compared to
the 16 bit index registers in the Z80, the 6502's 16 bit offset
(8 bits in the Z80), indexed indirect and indirect indexed addressing
make up for it. The conditional jump, call, and return instructions,
and others like decrement and branch if not zero, and the double
precision add and subtract of the Z80 can easily be implemented by
6502 software with little difference in system speed. The 6502's
additional and more useful addressing modes, make programs run
faster and take less space.
The 6502 processor performs arithmetic functions simply and
fast. Strict comparisons between the 6502 and the Z80 are complex,
but a study of standard benchmark programs by Mostek, (a Z80 source),
showed that the 6502 was faster and used less memory than the Z80 and
most other processors except in functions like moving big blocks of
data around in memory.
The Z80 has many more internal registers than the 6502, but
if you include the 6502's 256 zero page locations, it's the other
way around. The alternate registers of the Z80 provide for fast
interrupt context switching, but interrupt latentcy, etc. offset
this advantage.
In conclusion, it seems that the 6502 is more suited for
joint servo type applications than the Z80 in many ways:
Speed.
Price.
Availability.
Parts count.
Memory requirements.
Simple dual port memory.
Arithmetic capability.
Price is usually a function of die size and quantity. The
6502 has a smaller die than the Z80, has been selling better than
the Z80 or 8080, and is less expensive.